import { Entity, PrimaryGeneratedColumn, Column, OneToMany, Index } from "typeorm";

// 加参数为表名称 @Entity('demo')  表名称为demo   默认表名为类名称
@Entity('product')
export class Product {
    // 主键自增唯一值
    @PrimaryGeneratedColumn()
    product_id: number;

    @Column()
    product_name: string;

    @Column()
    category_id: number;

    @Column()
    product_title: string;

    @Column()
    product_intro: string;

    @Column()
    product_picture: string;

    @Column()
    product_price: string;

    @Column()
    product_selling_price: string;

    @Column()
    product_num: number;

    @Column()
    product_sales: number
}
